<?php
include_once 'module/controls.php';
include_once 'model/script/process.php';
$c = new controls();
$script = new script();
$fillAll = mysql_fetch_array($script->FillAll());
?>
<div id="content">
    <div class="content_block">
        <h2 class="jquery_tab_title"><?php echo $phrase["manager_script"] ?></h2>
        <form method="post" action="<?= $url["home"] ?>/menu/script-process" enctype="multipart/form-data">
            <?php if($fillAll) { ?>
                <p>
                    <?php echo $c->get_textHidden("id", $fillAll["script_id"]) ?>
                    <?php echo $c->get_label($phrase["javascript"]) ?>
                    <?php echo $c->get_textarea("script_code", $fillAll["script_code"]) ?>
                </p>

                <p>
                    <?php echo $c->get_button("update", $phrase["update"]) ?>
                </p>
            <?php } else { ?>
                <p>
                    <?php echo $c->get_label($phrase["javascript"]) ?>
                    <?php echo $c->get_textarea("script_code") ?>
                </p>

                <p>
                    <?php echo $c->get_button("accept", $phrase["accept"]) ?>
                </p>
            <?php } ?>
        </form>
    </div>
</div>